<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="format-detection" content="telephone=no"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="black"><link rel="icon" href="/images/icons/favicon-16x16.png?v=2.8.0" type="image/png" sizes="16x16"><link rel="icon" href="/images/icons/favicon-32x32.png?v=2.8.0" type="image/png" sizes="32x32"><meta name="description" content="笔者序         LFS官网: https:&#x2F;&#x2F;www.linuxfromscratch.org&#x2F;lfs&#x2F;read.html  本系列记录了笔者的操作系统课程设计“基于LFS的Linux发行版制作”中的大部分命令行操作，包含在构建过程中的一些bug排除过程，仅供参考。如果需要完整的构建教程，请前往LFS官网。 笔者基于LFS 11.0，以VMWare中的Ubuntu">
<meta property="og:type" content="article">
<meta property="og:title" content="LFS-I-Introduction">
<meta property="og:url" content="http://hipposox.github.io/2023/01/12/LFS-I-Introduction/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="笔者序         LFS官网: https:&#x2F;&#x2F;www.linuxfromscratch.org&#x2F;lfs&#x2F;read.html  本系列记录了笔者的操作系统课程设计“基于LFS的Linux发行版制作”中的大部分命令行操作，包含在构建过程中的一些bug排除过程，仅供参考。如果需要完整的构建教程，请前往LFS官网。 笔者基于LFS 11.0，以VMWare中的Ubuntu">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2023-01-12T14:28:05.000Z">
<meta property="article:modified_time" content="2023-01-12T15:25:21.234Z">
<meta property="article:author" content="HippoSoX">
<meta property="article:tag" content="LFS">
<meta name="twitter:card" content="summary"><title>LFS-I-Introduction | Hexo</title><link ref="canonical" href="http://hipposox.github.io/2023/01/12/LFS-I-Introduction/"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.12.1/css/all.min.css" type="text/css"><link rel="stylesheet" href="/css/index.css?v=2.8.0"><link rel="stylesheet" href="css/custom.css"><script>var Stun = window.Stun || {};
var CONFIG = {
  root: '/',
  algolia: undefined,
  assistSearch: undefined,
  fontIcon: {"prompt":{"success":"fas fa-check-circle","info":"fas fa-arrow-circle-right","warning":"fas fa-exclamation-circle","error":"fas fa-times-circle"},"copyBtn":"fas fa-copy"},
  sidebar: {"offsetTop":"20px","tocMaxDepth":6},
  header: {"enable":true,"showOnPost":true,"scrollDownIcon":false},
  postWidget: {"endText":true},
  nightMode: {"enable":true},
  back2top: {"enable":true},
  codeblock: {"style":"default","highlight":"dark","wordWrap":false},
  reward: false,
  fancybox: false,
  zoomImage: {"gapAside":"20px"},
  galleryWaterfall: undefined,
  lazyload: true,
  pjax: undefined,
  externalLink: {"icon":{"enable":true,"name":"fas fa-external-link-alt"}},
  shortcuts: undefined,
  prompt: {"copyButton":"复制","copySuccess":"复制成功","copyError":"复制失败"},
  sourcePath: {"js":"js","css":"css","images":"images"},
};

window.CONFIG = CONFIG;</script><meta name="generator" content="Hexo 5.4.2"></head><body><div class="container" id="container"><header class="header" id="header"><div class="header-inner"><nav class="header-nav header-nav--fixed"><div class="header-nav-inner"><div class="header-nav-menubtn"><i class="fas fa-bars"></i></div><div class="header-nav-menu"><div class="header-nav-menu-item"><a class="header-nav-menu-item__link" href="/"><span class="header-nav-menu-item__icon"><i class="fas fa-home"></i></span><span class="header-nav-menu-item__text">首页</span></a></div><div class="header-nav-menu-item"><a class="header-nav-menu-item__link" href="/archives/"><span class="header-nav-menu-item__icon"><i class="fas fa-folder-open"></i></span><span class="header-nav-menu-item__text">归档</span></a></div><div class="header-nav-menu-item"><a class="header-nav-menu-item__link" href="/categories/"><span class="header-nav-menu-item__icon"><i class="fas fa-layer-group"></i></span><span class="header-nav-menu-item__text">分类</span></a></div><div class="header-nav-menu-item"><a class="header-nav-menu-item__link" href="/tags/"><span class="header-nav-menu-item__icon"><i class="fas fa-tags"></i></span><span class="header-nav-menu-item__text">标签</span></a></div></div><div class="header-nav-mode"><div class="mode"><div class="mode-track"><span class="mode-track-moon"></span><span class="mode-track-sun"></span></div><div class="mode-thumb"></div></div></div></div></nav><div class="header-banner"><div class="header-banner-info"><div class="header-banner-info__title">erocool</div><div class="header-banner-info__subtitle">You know what</div></div></div></div></header><main class="main" id="main"><div class="main-inner"><div class="content-wrap" id="content-wrap"><div class="content" id="content"><!-- Just used to judge whether it is an article page--><div id="is-post"></div><div class="post"><header class="post-header"><h1 class="post-title">LFS-I-Introduction</h1><div class="post-meta"><span class="post-meta-item post-meta-item--createtime"><span class="post-meta-item__icon"><i class="far fa-calendar-plus"></i></span><span class="post-meta-item__info">发表于</span><span class="post-meta-item__value">2023-01-12</span></span><span class="post-meta-item post-meta-item--updatetime"><span class="post-meta-item__icon"><i class="far fa-calendar-check"></i></span><span class="post-meta-item__info">更新于</span><span class="post-meta-item__value">2023-01-12</span></span></div></header><div class="post-body">
        <h1 id="笔者序"   >
          <a href="#笔者序" class="heading-link"><i class="fas fa-link"></i></a><a class="markdownIt-Anchor" href="#笔者序"></a> 笔者序</h1>
      
<blockquote>
<p>LFS官网: <span class="exturl"><a class="exturl__link"   target="_blank" rel="noopener" href="https://www.linuxfromscratch.org/lfs/read.html" >https://www.linuxfromscratch.org/lfs/read.html</a><span class="exturl__icon"><i class="fas fa-external-link-alt"></i></span></span></p>
</blockquote>
<p>本系列记录了笔者的操作系统课程设计“基于LFS的Linux发行版制作”中的大部分命令行操作，包含在构建过程中的一些bug排除过程，仅供参考。如果需要完整的构建教程，请前往LFS官网。</p>
<p>笔者基于LFS 11.0，以VMWare中的Ubuntu 18.04 LTS虚拟机作为宿主机进行构建。</p>
<p>第V部分系统配置中，笔者也没成功。。。</p>

        <h1 id="i-如何构建-lfs-系统"   >
          <a href="#i-如何构建-lfs-系统" class="heading-link"><i class="fas fa-link"></i></a><a class="markdownIt-Anchor" href="#i-如何构建-lfs-系统"></a> I 如何构建 LFS 系统</h1>
      
<p>LFS 系统必须在一个已经安装好的 Linux 发行版 (如 Debian、OpenMandriva、Fedora 或者 openSUSE) 中构建。这个安装好的 Linux 系统 (称为宿主) 提供包括编译器、链接器和 shell 在内的必要程序，作为构建新系统的起点。请在安装发行版的过程中选择“development” (开发) 选项，以使用这些工具。</p>
<span id="more"></span>
<p>您也可以选择不安装一个单独的发行版，而是使用某个商业发行版的 LiveCD。</p>
<p>本书的第 2 章描述了如何创建一个新的 Linux 本地分区和文件系统，新的 LFS 系统将在该文件系统中被编译和安装。第 3 章列举了在构建 LFS 系统的过程中必须下载的软件包和补丁，并解释了在新文件系统中存储它们的方法。第 4 章讨论工作环境的正确配置。请仔细阅读第 4 章，因为它解释了您在开始第 5 章及后续章节的工作前必须了解的一些重要问题。</p>
<p>第 5 章解释初始工具链 (binutils, gcc,以及 glibc) 的安装过程，在安装过程中使用交叉编译技术，将新的工具与宿主系统完全隔离。</p>
<p>第 6 章向您展示如何使用刚刚构建的交叉工具链，交叉编译一些基本工具。</p>
<p>之后在第 7 章中，进入一个 “chroot” 环境，并使用之前构建的工具，再构建一些额外的工具，这些额外工具对于构建和测试最终的系统是必要的。</p>
<p>我们努力将新构造的系统从宿主发行版分离出来。这个过程看上去很繁琐，我们将会在工具链技术说明中完整地从技术上解释这样做的必要性。</p>
<p>在第 8 章中，我们将构建完整的 LFS 系统。使用 chroot 环境的另一项优势是，在构建 LFS 的过程中，您可以继续使用宿主系统。这样，在等待软件包编译的过程中，您可以继续正常使用计算机。</p>
<p>为了完成安装，我们在第 9 章中进行系统的基本设置，在第 10 章中配置内核和引导加载器。最后，第 11 章包含在阅读完本书后继续体验 LFS 的相关信息。在完成本书的所有流程后，重启计算机即可进入新的 LFS 系统。</p>
<p>以上是 LFS 构建过程的简要介绍，针对特定步骤的详细信息将在之后章节以及软件包的简介中讨论。在您踏上 LFS 的构建之旅后，就能逐步理清这些看上去很复杂的步骤，每一步都将变得非常清晰。</p>
</div><footer class="post-footer"><div class="post-ending ending"><div class="ending__text">------ 本文结束，感谢您的阅读 ------</div></div><div class="post-copyright copyright"><div class="copyright-author"><span class="copyright-author__name">本文作者: </span><span class="copyright-author__value"><a href="http://hipposox.github.io">HippoSoX</a></span></div><div class="copyright-link"><span class="copyright-link__name">本文链接: </span><span class="copyright-link__value"><a href="http://hipposox.github.io/2023/01/12/LFS-I-Introduction/">http://hipposox.github.io/2023/01/12/LFS-I-Introduction/</a></span></div><div class="copyright-notice"><span class="copyright-notice__name">版权声明: </span><span class="copyright-notice__value">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en" rel="external nofollow" target="_blank">BY-NC-SA</a> 许可协议。转载请注明出处！</span></div></div><div class="post-tags"><span class="post-tags-item"><span class="post-tags-item__icon"><i class="fas fa-tag"></i></span><a class="post-tags-item__link" href="http://hipposox.github.io/tags/LFS/">LFS</a></span></div><nav class="post-paginator paginator"><div class="paginator-prev"><a class="paginator-prev__link" href="/2023/01/12/LFS-II-%E5%87%86%E5%A4%87%E5%B7%A5%E4%BD%9C/"><span class="paginator-prev__icon"><i class="fas fa-angle-left"></i></span><span class="paginator-prev__text">LFS-II-准备工作</span></a></div><div class="paginator-next"><a class="paginator-next__link" href="/2023/01/12/OCCT-Tutorials-and-Demos-02-Draw-Demo-Scripts/"><span class="paginator-prev__text">OCCT-Tutorials_and_Demos_02:Draw:Demo_Scripts</span><span class="paginator-next__icon"><i class="fas fa-angle-right"></i></span></a></div></nav></footer></div></div></div><div class="sidebar-wrap" id="sidebar-wrap"><aside class="sidebar" id="sidebar"><div class="sidebar-nav"><span class="sidebar-nav-toc current">文章目录</span><span class="sidebar-nav-ov">站点概览</span></div><section class="sidebar-toc"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#%E7%AC%94%E8%80%85%E5%BA%8F"><span class="toc-number">1.</span> <span class="toc-text">
           笔者序</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#i-%E5%A6%82%E4%BD%95%E6%9E%84%E5%BB%BA-lfs-%E7%B3%BB%E7%BB%9F"><span class="toc-number">2.</span> <span class="toc-text">
           I 如何构建 LFS 系统</span></a></li></ol></section><!-- ov = overview--><section class="sidebar-ov hide"><div class="sidebar-ov-author"><div class="sidebar-ov-author__avatar"><img class="sidebar-ov-author__avatar_img" src="/images/icons/stun-logo.svg" alt="avatar"></div><p class="sidebar-ov-author__text">motto</p></div><div class="sidebar-ov-state"><a class="sidebar-ov-state-item sidebar-ov-state-item--posts" href="/archives/"><div class="sidebar-ov-state-item__count">19</div><div class="sidebar-ov-state-item__name">归档</div></a><a class="sidebar-ov-state-item sidebar-ov-state-item--categories" href="/categories/"><div class="sidebar-ov-state-item__count">6</div><div class="sidebar-ov-state-item__name">分类</div></a><a class="sidebar-ov-state-item sidebar-ov-state-item--tags" href="/tags/"><div class="sidebar-ov-state-item__count">14</div><div class="sidebar-ov-state-item__name">标签</div></a></div><div class="sidebar-ov-cc"><a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en" target="_blank" rel="noopener" data-popover="知识共享许可协议" data-popover-pos="up"><img src="/images/cc-by-nc-sa.svg"></a></div></section><div class="sidebar-reading"><div class="sidebar-reading-info"><span class="sidebar-reading-info__text">你已阅读了 </span><span class="sidebar-reading-info__num">0</span><span class="sidebar-reading-info__perc">%</span></div><div class="sidebar-reading-line"></div></div><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=1449790718&auto=1&height=66"></iframe></aside></div><div class="clearfix"></div></div></main><footer class="footer" id="footer"><div class="footer-inner"><div><span>Copyright © 2023</span><span class="footer__icon"><i class="fas fa-heart"></i></span><span>HippoSoX</span></div><div><span>由 <a href="http://hexo.io/" title="Hexo" target="_blank" rel="noopener">Hexo</a> 强力驱动</span><span> v5.4.2</span><span class="footer__devider">|</span><span>主题 - <a href="https://github.com/liuyib/hexo-theme-stun/" title="Stun" target="_blank" rel="noopener">Stun</a></span><span> v2.8.0</span></div></div></footer><div class="loading-bar" id="loading-bar"><div class="loading-bar__progress"></div></div><div class="back2top" id="back2top"><span class="back2top__icon"><i class="fas fa-rocket"></i></span></div></div><script src="https://cdn.jsdelivr.net/npm/jquery@v3.4.1/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.5.2/velocity.ui.min.js"></script><script src="https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.min.js"></script><script src="/js/utils.js?v=2.8.0"></script><script src="/js/stun-boot.js?v=2.8.0"></script><script src="/js/scroll.js?v=2.8.0"></script><script src="/js/header.js?v=2.8.0"></script><script src="/js/sidebar.js?v=2.8.0"></script></body></html>